#include "ChatDialog/customizeedit.h"

CustomizeEdit::CustomizeEdit(QWidget* parent)
    : QLineEdit(parent) , _max_len(0){
    // QLineEdit 输入框有变化的话，就会触发当前 CustomizeEdit 的 limitTextLength 槽函数
    connect(this, &QLineEdit::textChanged, this, &CustomizeEdit::limitTextLength);
}

void CustomizeEdit::SetMaxLength(int maxLen){
    _max_len = maxLen;
}


